package com.gin.kotlin.no_gay_alliance.model.emoji

import android.os.Parcelable
import com.gin.nga.response.resource.bbscode.Emote
import kotlinx.parcelize.Parcelize

/**
 * 通用表情数据
 * @property code 插入的代码
 * @property url 对应的图片地址
 * @property groupName 分组名，用于屏蔽设置
 * @constructor
 */
@Parcelize
data class GenericEmojiModel(
    var code: String? = null,
    var url: String? = null,
) : Parcelable {

    constructor(data: Emote) : this(
        code = data.bbsCode,
        url = data.url,
    )

    constructor(data: EmojiModel) : this(
        code = "[img]${data.img}[/img]",
        url = data.getUrl(),
    )
}
